<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>商城后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/lib/layui-v2.5.5/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/css/public.css}" media="all">
    <link rel="stylesheet" th:href="@{/lib/layui_ext/dtree/dtree.css}" >
    <link rel="stylesheet" th:href="@{/lib/layui_ext/dtree/font/dtreefont.css}" >
    <style>
        body {
            background-color: #ffffff;
        }
        .layui-table-cell {
            height: auto !important;
            white-space: normal;
        }
    </style>


</head>
<body>

<span th:replace="common_page::common"></span>

<div class="layuimini-container" style="height:100%">
    <div class="layui-form layuimini-form">
        <input type="hidden" name="id" id="id" th:value="${model.id}">

        <div class="layuimini-main" >
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="layui-this">商品信息</li>
                </ul>

                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">

                        <div class="layui-form-item" >
                            <div class="layui-form-item" >
                                <div class="layui-inline" style="width:40%">
                                    <label class="layui-form-label " >ID</label>
                                    <div class="layui-input-block">
                                        <input type="text"  th:value="${model.id}"  class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-inline" style="width:40%">
                                    <label class="layui-form-label " >SKU ID</label>
                                    <div class="layui-input-block">
                                        <input type="text"  th:value="${model.id}"  class="layui-input">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">商品主图</label>
                            <div class="layui-input-block">
                                <img th:src="${model.httpProductPreviewPath}" th:width="450" th:height="450">
                            </div>
                        </div>

                        <div class="layui-form-item" >
                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >商品名称</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.name}"  class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">

                                <label class="layui-form-label " >分类名称</label>
                                <div class="layui-input-block">
                                    <input type="hidden" id="categoryId" th:value="${model.categoryId}" />
                                    <input type="text"  th:value="${model.categoryName}"  class="layui-input">
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item" >

                            <div class="layui-inline" style="width:40%">

                                <label class="layui-form-label " >分类名称</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.categoryPath}"  class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >单价</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.price}"  class="layui-input">
                                </div>
                            </div>

                        </div>

                        <div class="layui-form-item" >
                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label "  >品牌ID</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.brandId}"  class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >品牌名称</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.brandName}"  class="layui-input">
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item" >
                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label "  >品牌中文名称</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.brandNameCN}"  class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >品牌英文名称</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.brandNameEN}"  class="layui-input">
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item" >
                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >店铺ID</label>
                                <div class="layui-input-block">
                                    <input type="text"  id="shopId" th:value="${model.shopId}"  class="layui-input">
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >属性值</label>
                                <div class="layui-input-block">
                                    <input type="text"  th:value="${model.attributeValueGroup}"  class="layui-input">
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item" >
                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >属性列表</label>
                                <div class="layui-input-block">
                                    <table class="layui-table">
                                        <thead>
                                        <tr>
                                            <th lay-data="width:100}">属性名ID</th>
                                            <th lay-data="width:100}">属性名</th>
                                            <th lay-data="minWidth: 100}">属性值ID</th>
                                            <th lay-data="minWidth: 100}">属性值</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr th:each="attribute : ${model.attributes}">
                                            <td th:text="${attribute.nameId}"></td>
                                            <td th:text="${attribute.name}"></td>
                                            <td th:text="${attribute.valueId}"></td>
                                            <td th:text="${attribute.value}"></td>
                                        </tbody>
                                    </table>
                                    <!--<textarea class="layui-textarea"  th:text="${model.attributes}" ></textarea>-->
                                </div>
                            </div>

                            <div class="layui-inline" style="width:40%">
                                <label class="layui-form-label " >搜索属性</label>
                                <div class="layui-input-block">
                                    <table class="layui-table">
                                        <thead>
                                        <tr>
                                            <th lay-data="width:100}">属性名ID</th>
                                            <th lay-data="width:100}">属性名</th>
                                            <th lay-data="minWidth: 100}">属性值ID</th>
                                            <th lay-data="minWidth: 100}">属性值</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr th:each="attribute : ${model.searchAttributes}">
                                            <td th:text="${attribute.nameId}"></td>
                                            <td th:text="${attribute.name}"></td>
                                            <td th:text="${attribute.valueId}"></td>
                                            <td th:text="${attribute.value}"></td>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:src="@{/lib/layui-v2.5.5/layui.js}" charset="utf-8"></script>
<script>
    layui.use(['form','element', 'table','carousel'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table,
            expressTable = layui.table,
            emsTable = layui.table,
            ordinaryMailTable = layui.table,
            element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        var carousel = layui.carousel;
        var carouselsku = layui.carousel;


    });
</script>
</body>
</html>